﻿using System;
using System.Collections;

using mborn.Model;
namespace mborn.DAL
{
    public class ArticleDAL
    {
        public EntityControl control;

        public  ArticleDAL()
        {
            control = EntityControl.CreateEntityControl("Model");
        }


        public void AddArticle(Article article)
        {
            control.AddEntity(article);
        }

        public void UpdateArticle(Article article, int ID)
        {
            control.UpdateEntity(article, ID);
        }

        public void DeleteArticle(Article article)
        {
            control.DeleteEntity(article);
        }

        public IList GetAllArticle(string strHQL)
        {
            return control.GetEntities(strHQL);
        }
    }
}
